﻿<UserControl x:Class="De06B_Nhom02.Controls.PushPin"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             Height="100"
             Width="100"
             d:DesignHeight="100"
             d:DesignWidth="100">
    <UserControl.Resources>
        <Storyboard x:Key="ShowPushPin">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)"
                                           Storyboard.TargetName="rect1">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2"
                                      Value="100" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                           Storyboard.TargetName="ellipse"
                                           RepeatBehavior="Forever">
                <EasingDoubleKeyFrame KeyTime="0:0:0.7"
                                      Value="70" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                           Storyboard.TargetName="ellipse"
                                           RepeatBehavior="Forever">
                <EasingDoubleKeyFrame KeyTime="0:0:0.7"
                                      Value="70" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="ellipse"
                                           RepeatBehavior="Forever">
                <EasingDoubleKeyFrame KeyTime="0"
                                      Value="0.5" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.7"
                                      Value="0.2">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CircleEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Canvas>
        <Canvas Height="100"
                Width="100">
            <Canvas.Clip>
                <EllipseGeometry Center="50,100"
                                 RadiusX="100"
                                 RadiusY="{Binding Height, ElementName=rect1}" />
            </Canvas.Clip>
            <Path x:Name="path"
                  Data="M49.324,4.814C34.992,4.814 23.37,16.436 23.37,30.768 23.37,36.604 25.299,41.991 28.544,46.324 28.555,46.33 28.56,46.341 28.56,46.346 29.177,47.253 49.056,76.404 49.323,95.768 49.591,76.404 69.469,47.253 70.087,46.346 70.098,46.33 70.103,46.324 70.103,46.324 73.35,41.991 75.277,36.604 75.277,30.768 75.277,16.437 63.657,4.814 49.324,4.814z M49.324,18.474C55.81,18.474 61.072,23.736 61.072,30.222 61.072,36.708 55.81,41.97 49.324,41.97 42.838,41.97 37.577,36.708 37.577,30.222 37.577,23.736 42.838,18.474 49.324,18.474z"
                  Fill="Red"
                  Height="100"
                  Width="100"
                  Stroke="Black"
                  StrokeThickness="2" />
            <Rectangle x:Name="rect1"
                       Height="0"
                       Width="100" />
        </Canvas>
        <Ellipse x:Name="ellipse"
                 Height="2"
                 Width="2"
                 HorizontalAlignment="Center"
                 Canvas.Top="99"
                 Opacity="0.5"
                 RenderTransformOrigin="0.5,0.5"
                 Canvas.Left="49"
                 Fill="#FFE600FF">
            <Ellipse.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Ellipse.RenderTransform>
        </Ellipse>
    </Canvas>
</UserControl>